from experience import Experience

# Lesson 1 Experience Derived Class
class Experience10(Experience):

    def __init__(self, experiment, result):
        super().__init__(experiment, result)

    #Extract earlier experience
    @classmethod
    def anticipate(cls, experiment):
        result = ''
        if experiment in cls.dictExperiences:
            exp = cls.dictExperiences[experiment]
            result = exp.result
        return result

    #Store new experience
    @classmethod
    def recordTuple(cls, experiment, result):
        if experiment not in cls.dictExperiences:
            exp = Experience(experiment, result)
            cls.dictExperiences[experiment] = exp